<?php


namespace app\home\model\page\management;


use app\api\model\dao\DashangGift;
use app\library\Error;
use app\library\PageBase;

class DashangPage extends PageBase
{
    private $objDashang;

    public function __construct()
    {
        parent::__construct();

        $this->objDashang = new DashangGift();
    }

    public function excute($param)
    {
        $ret = $this->checkToken($param);
        if (false === $ret) {
            header('Location:/home/loginpage');
            return $this->getRes(Error::ERR_NO_AUTH);
        }

        try {
            $ret = $this->objDashang->dashangPage();
        } catch (Exception $e) {
            return $this->getRes(Error::ERR_SYS, $e->getMessage());
        }
        $this->data = $ret;
        return $this->getRes();
    }
}